/**
 * 
 */
package com.hfjyz.examination.dao.impl;

import java.util.List;
import java.util.Set;

import com.hfjyz.examination.dao.QuestionOptionsDao;
import com.hfjyz.examination.domain.QuestionOptions;
import com.hfjyz.examination.object.SearchCondition;

/**
 *
 */
public class QuestionOptionsDaoImpl extends BaseDaoImpl<QuestionOptions, Long>
		implements QuestionOptionsDao {

	public QuestionOptionsDaoImpl() {
		super(QuestionOptions.class);
	}

	@Override
	public List<QuestionOptions> find(SearchCondition condition)
			throws Exception {
		return null;
	}

	@Override
	public void updateAll(Set<QuestionOptions> ops) throws Exception {
		for (QuestionOptions op : ops) {
			if (op.getId() == null) {
				Long id = (Long) hibernateTemplate.save(op);
				op.setId(id);
			} else {
				hibernateTemplate.update(op);
			}
		}
	}

}
